<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增产犊记录')" />
	<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncCowsBirth-add" >
			<input type="hidden" name="cowId" id="cowId" th:value="${cowId}">

			<div class="form-group">
				<label class="col-sm-3 control-label">发情时间：</label>

				<div class="col-sm-8">
					<input id="fqDate" data-format="yyyy-MM-dd HH:mm:ss" data-type="datetime" required  name="fqDate" placeholder="请选择时间"  th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" th:class="time-input" >
				</div>

				<!--<div class="col-sm-8">
					<input id="fqDate" name="fqDate" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">配种时间：</label>
				<div class="col-sm-8">
					<input id="pzDate" data-format="yyyy-MM-dd HH:mm:ss" data-type="datetime" required  name="pzDate" placeholder="请选择时间"  th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" th:class="time-input" >
				</div>
				<!--<div class="col-sm-8">
					<input id="pzDate" name="pzDate" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">产犊时间：</label>
				<div class="col-sm-8">
					<input id="givebirthTime" data-format="yyyy-MM-dd HH:mm:ss" data-type="datetime" required name="givebirthTime" placeholder="请选择时间"  th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" th:class="time-input" >
				</div>

				<!--<div class="col-sm-8">
					<input id="givebirthTime" name="givebirthTime" class="form-control" type="text">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">犊牛性别：</label>
				<div class="col-sm-8">
					<select name="childGender" class="form-control m-b" th:with="type=${@dict.getType('childGender')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>

					</select>

					<!--<input id="childGender" name="childGender" class="form-control" type="text">-->
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">耳号：</label>
				<div class="col-sm-8">
					<input id="childCode" name="childCode" class="form-control" type="number">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">犊牛体重：</label>
				<div class="col-sm-8">
					<input id="childWeight" name="childWeight" class="form-control" type="number" step="0.01">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
				<textarea id="remark" name="remark" class="form-control" type="text" rows="4">  </textarea>
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">更新时间：</label>
				<div class="col-sm-8">
					<input id="updateTime" name="updateTime" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">淘汰时间：</label>
				<div class="col-sm-8">
					<input id="eliminateTime" name="eliminateTime" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">淘汰原因：</label>
				<div class="col-sm-8">
					<input id="eliminateReason" name="eliminateReason" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">创建时间：</label>
				<div class="col-sm-8">
					<input id="createTime" name="createTime" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">创建者：</label>
				<div class="col-sm-8">
					<input id="createBy" name="createBy" class="form-control" type="text">
				</div>
			</div>-->

			<!--<div class="form-group">
				<label class="col-sm-3 control-label">牛犊子id （主键）：</label>
				<div class="col-sm-8">
					<input id="birthId" name="birthId" class="form-control" type="text">
				</div>
			</div>-->
		</form>
	</div>
    <div th:include="include::footer"></div>
	<th:block th:include="include :: select2-js" />
    <script type="text/javascript">
		var prefix = ctx + "system/ncCowsBirth"
		$("#form-ncCowsBirth-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-ncCowsBirth-add').serialize());
	        }
	    }
	</script>
</body>
</html>
